<template>
	首页
	<From @onSubmit="submitBtn" :options="options"></From>
</template>
<script>
	import From from '@/components/from.vue' 
	import { defineComponent, reactive, toRefs } from 'vue'
	export default defineComponent({
		components: {
			From
		},
		setup() {
			const data = reactive({
				options: [
					{
					  value: 'Option1',
					  label: 'Option1',
					},
					{
					  value: 'Option2',
					  label: 'Option2',
					},
					{
					  value: 'Option3',
					  label: 'Option3',
					},
					{
					  value: 'Option4',
					  label: 'Option4',
					},
					{
					  value: 'Option5',
					  label: 'Option5',
					}
				]
			})
			const submitBtn = (e) => {
			  // 获取表单数据
			  console.log("submitBtn", e);
			}
			return {
				...toRefs(data),
				submitBtn
			};
		}
	})
</script>
<style lang="scss">
	
</style>
